package org.middleware.dao.system;

import org.middleware.entity.system.SysPermissions;
import org.middleware.mapper.system.SysPermissionsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class SysPermissionDao {
    @Autowired
    private SysPermissionsMapper permissionsMapper;

    public int queryInsert(SysPermissions permission) {
        return permissionsMapper.queryInsert(permission);
    }

    public List<SysPermissions> searchPermissionsBySystem(int systemId) {
        return permissionsMapper.queryPermissionBySystemId(systemId);
    }

    public int update(SysPermissions permission) {
        return permissionsMapper.queryUpdate(permission);
    }

    public int delete(int id) {
        return permissionsMapper.queryDelete(id);
    }
}
